package com.heyi.nettylong.server.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 服务端配置参数
 * @author dengfeng
 * @date 2022/4/117:10
 */
@Data
@ConfigurationProperties(prefix = "netty.server")
public class ServerProperties {

    private String host = "0.0.0.0";

    private int port = 10018;

    private int bossCount = 1;

    private int workerCount = 0;

    //@Value("${server.READER_IDLE_TIME_SECONDS:60}")
    //private int READER_IDLE_TIME_SECONDS;

    //@Value("${server.WRITER_IDLE_TIME_SECONDS}")
    //private int WRITER_IDLE_TIME_SECONDS;

    /** 心跳间隔时间 */
    private int heartSeconds = 15;
}
